package com.andy.wang.service;

import com.andy.wang.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
* @author 王更元
* @description 针对表【user】的数据库操作Service
* @createDate 2024-04-02 11:33:38
*/
public interface UserService extends IService<User> {
    //    用户注册
    int insertSelective(User record, String imgType);
    //使用Redis存储用户数据
    User sessionPhone(String phone, HttpServletRequest request);

    /**
     * 查询兴趣爱好完成匹配的
     * @param uhobbys
     * @return
     */
    List<User> selectUhobbys(Long uid,String uhobbys);

    List<User> QueryRecommendation(Long uid,String uhobbys,int count,String search);

    /**
     * 查询总条数
     *
     * @return
     */
    int QueryCountNumber();

    int updateUser(HttpServletRequest request,User user, String imgType,String Phone);
    //    用户注销
    int deleteUser(Integer id);

}
